'use strict';

const Controller = require('egg').Controller;
class userData extends Controller { 
    async getUser(){
    const { app,ctx } = this;
    const { id } = ctx.query; 
    const { Raw } = app.Dbs.tree;
    const Data=await Raw.Execute('select tabledata.*,userdata.* from tabledata right join userdata on userdata.tid=tabledata.id where userdata.id=:id',{
      replacements: { id }
    })
    return Data
    } 
}
module.exports = userData;